package com.zhu.tool_test.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;


import java.io.Serializable;
import java.util.Date;

/**
 * @author ：wph
 * @date ：Created in 2019/10/8 15:19
 * @description：
 * @modified By：
 * @version: $
 */
@EqualsAndHashCode()
@Data
@TableName("device")
public class Device extends Model<Device> {

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long siteId;

    private String mn;

    private String polName;

    private Integer factorId;

    private String alarmInfo;

    private String flag;

    private Date sampleTime;

    private String alarmDetail;




    @Override
    protected Serializable pkVal() {
        return id;
    }

    @Override
    public String toString() {
        return "Device{" +
                "id=" + id +
                ", siteId=" + siteId +
                ", mn='" + mn + '\'' +
                ", polName='" + polName + '\'' +
                ", factorId=" + factorId +
                ", alarmInfo='" + alarmInfo + '\'' +
                ", flag='" + flag + '\'' +
                ", sampleTime=" + sampleTime +
                ", alarmDetail='" + alarmDetail + '\'' +
                '}';
    }
}
